package com.bestcem.xm.deliver.enums;

import cn.hutool.core.collection.ListUtil;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

@Getter
@AllArgsConstructor
public enum DeliverStatusEnum {
    DELIVER_STATUS_START(0, "投放中"),
    DELIVER_STATUS_STOP(1, "未投放"),
    DELIVER_STATUS_FINISH(2, "已结束"),
    DELIVER_STATUS_DELETE(3, "已删除"),
    DELIVER_STATUS_UNREVIEWED(4, "待审核"),
    DELIVER_STATUS_UNDER_REVIEW(5, "审核中"),
    DELIVER_STATUS_REVIEW_SUCCESS(6, "审核成功"),
    DELIVER_STATUS_REVIEW_FAIL(7, "审核驳回"),
    DELIVER_STATUS_DONE(8, "已投放"),
    DELIVER_STATUS_FINISH_STOP(9, "已结束未投放"),
    DELIVER_STATUS_ACTIVE(10, "生效中"),
    DELIVER_STATUS_PAUSE(11, "已暂停");

    @EnumValue
    private final int value;

    private final String desc;

    public static List<Integer> getCheck1Value() {
        return ListUtil.of(DELIVER_STATUS_UNREVIEWED.value, DELIVER_STATUS_REVIEW_FAIL.value, DELIVER_STATUS_STOP.value, DELIVER_STATUS_PAUSE.value);
    }

    public static List<Integer> getCheck0Value() {
        return ListUtil.of(DELIVER_STATUS_STOP.value, DELIVER_STATUS_PAUSE.value);
    }

    public static List<Integer> getDeliverCheck1Value() {
        return ListUtil.of(DELIVER_STATUS_STOP.value, DELIVER_STATUS_REVIEW_SUCCESS.value, DELIVER_STATUS_START.value);
    }

    public static List<Integer> getDeliverCheck0Value() {
        return ListUtil.of(DELIVER_STATUS_STOP.value, DELIVER_STATUS_FINISH.value, DELIVER_STATUS_DELETE.value, DELIVER_STATUS_FINISH_STOP.value);
    }

    public static List<Integer> deliverNormalStatus() {
        return ListUtil.of(DELIVER_STATUS_START.value, DELIVER_STATUS_FINISH.value, DELIVER_STATUS_DONE.value);
    }

    public static List<Integer> getDeliverCheck2Value() {
        return ListUtil.of(DELIVER_STATUS_UNREVIEWED.value, DELIVER_STATUS_REVIEW_FAIL.value, DELIVER_STATUS_STOP.value);
    }

    public static List<Integer> getDeliverCheck3Value() {
        return ListUtil.of(DELIVER_STATUS_STOP.value, DELIVER_STATUS_FINISH.value, DELIVER_STATUS_DELETE.value);
    }
}
